package com.example.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.entity.Employee;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @Description TODO
 * @Author dingchunlin
 * @Date 2023/12/27 20:37
 * @Version 1.0.0
 */
@Mapper
public interface EmployeeMapper extends BaseMapper<Employee> {

    @Select("select * from employee where username = #{userName}")
    Employee selectByUserName(String userName);

    @Select("select * from employee where employee_number LIKE CONCAT('%', #{employeeNumber}, '%')")
    List<Employee> selectByEmployeeNumberEmployees(@Param("employeeNumber") String employeeNumber);

}
